package org.example.crm.dao;

import com.sun.org.apache.xpath.internal.operations.Mod;
import org.apache.ibatis.annotations.Mapper;
import org.example.crm.base.BaseMapper;
import org.example.crm.model.Module;
import org.example.crm.vo.TreeModuleVo;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface ModuleMapper extends BaseMapper<Module, Integer> {

    //查询所有的资源列表
    public List<TreeModuleVo> queryAllModules();

    //查询所有的资源数据
    List<Module> queryModuleList();

    Module selectSameGradeByModuleName(String moduleName, Integer grade);

    Module selectSameGradeByModuleUrl(String url, Integer grade);

    Module selectByOptValue(String optValue);

    Integer delete(Integer id);

    Integer selectByParentId(Integer id);
}